package day11.printer;


/**
 * @author oldliu
 * @since 1.0
 */
//打印机
public class Printer {
    //品牌和价格
    private String brand;
    private int price;
    //打印机中包含墨水和纸张的一个接口
    private Ink ink;
    private Paper paper;

    public Printer(String brand, int price) {
        this.brand=brand;
        this.price=price;
    }

    public Printer() {
    }
    public void print(String s){
        System.out.println("这个打印机是"+brand+",价格是"+price+"元");
        System.out.println("使用"+ink.getColor()+"来打印");
        System.out.println("打印的内容是：");
        paper.print(s);
    }
    public String getBrand() {
        return brand;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
